Skip to content

tools: enforce function name matching in linter#9408

Closed
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:fnm
Closed

tools: enforce function name matching in linter#9408
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:fnm

Conversation

@Trott

@Trott Trott commented Nov 1, 2016

Copy link
Copy Markdown
Member
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

tools

Description of change

ESLint has a func-name-matching rule that requires that function names
match the variable or property to which they are being assigned.

The code base currently has 100% compliance with this rule.

Enable the rule to keep it that way.

ESLint has a `func-name-matching` rule that requires that function names
match the variable or property to which they are being assigned.

The code base currently has 100% compliance with this rule.

Enable the rule to keep it that way.
@Trott Trott added the tools Issues and PRs related to the tools directory. label Nov 1, 2016

@silverwind silverwind left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'm surprised it passes as-is.

@jasnell

jasnell commented Nov 2, 2016

Copy link
Copy Markdown
Member

hmm.. I believe I've seen a couple of cases in the recent function naming PRs that could violate this but in theory, LGTM

@gibfahn

gibfahn commented Nov 2, 2016

Copy link
Copy Markdown
Member

@jasnell Then I guess we just need to make sure we run the linter on those PRs before we merge them?

Trott added a commit to Trott/io.js that referenced this pull request Nov 4, 2016
ESLint has a `func-name-matching` rule that requires that function names
match the variable or property to which they are being assigned.

The code base currently has 100% compliance with this rule.

Enable the rule to keep it that way.

PR-URL: nodejs#9408
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
@Trott

Trott commented Nov 4, 2016

Copy link
Copy Markdown
Member Author

Landed in 7537718

@Trott Trott closed this Nov 4, 2016
evanlucas pushed a commit that referenced this pull request Nov 7, 2016
ESLint has a `func-name-matching` rule that requires that function names
match the variable or property to which they are being assigned.

The code base currently has 100% compliance with this rule.

Enable the rule to keep it that way.

PR-URL: #9408
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
@MylesBorins

Copy link
Copy Markdown
Contributor

@Trott do you want to manually backport this rule + fixes to v4 and v6?

@Trott

Trott commented Nov 22, 2016

Copy link
Copy Markdown
Member Author

@thealphanerd Unless you think otherwise, I think it's OK if this doesn't land in v4 and v6. I'll change the labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants